package com.base.grammardemo;

/*
 * Switch语句的贯穿现象
 * */
public class SwitchPenetration {
	public static void main(String[] args) {
		// TODO 自动生成的方法存根
        int score=4;
        switch(score){
          case 5:
        	  score++;
          case 4:
        	  score++;
        	  //由于在这里没有break命令score这个值会往下贯穿
          case 3:
        	  score++;
          case 2:
        	  score++;
          case 1:
        	  score++;
          case 0:
        	  score++;
          default:
        	  System.out.println(score);
        }
	}
}